import { TtableU } from "../interface";


export function modelFind<T>(model: TtableU<T>[], key?: Array<keyof T>): TtableU<T>[] {
    if (!key) return model;
    return model.filter(({ prop }) => {
        if (prop) {
            return key.includes(prop);
        }
    });
}